package com.woniuxy.hotel.user.mapper;

import java.util.Collection;

import org.apache.ibatis.annotations.Param;

import com.woniuxy.hotel.user.pojo.User;

public interface UserMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    
    User findUserByAccount(String account);
    
    String findAccountByPhone(String phone);

	User findUserByPhone(String phone);

	int updatePhone(@Param("currentPhone") String currentPhone, @Param("newPhone") String newPhone);

	Collection<String> showUserRoles(String account);
	
	int updatePasswordByAccount(@Param("account") String account, @Param("password") String password);
}